const webpack = require('webpack');
const pkg = require('../package.json');

module.exports = {
  mode: "development",
  entry: './index.js',
  output: {
    path: __dirname + `/build/v${pkg.version}`,
    filename: "bundle.js"
  },
  resolve: {
    extensions: [".js", ".jsx"]
  },
  module: {
    rules: [{
      test: /\.js$/,
      exclude: /node_modules/,
      loader: 'babel-loader',
      query: {
        plugins: ['transform-runtime'],
        presets: ['react', 'stage-2']
      }
    },
    {
      test: /\.css$/,
      loader: "style-loader!css-loader"
    },
    {
      test: /\.scss$/,
      loader: 'style-loader!css-loader!sass-loader'
    },
    {
      test: /\.(eot|svg|ttf|woff|woff2)(\?.+)?$/,
      loader : 'file-loader'
    },
    {
      test: /\.md$/,
      loader : 'raw-loader'
    }]
  }
}
